const express = require('express');
const path = require('path');
const BS = path.resolve();

module.exports = function(app) {

  /**
   * 首页
   * @type {String}
   */
	app.get('/', (req, res) => {

    res.render('index', {
        title: '我的世界',
        hotels: {
          arout: 1,
          cc: 0
        }
      })
  });


	app.get('/list', (req, res) => {

    res.render('list')
  });

  /**
   * 404
   */
	app.get('*', (req, res) => {
		res.writeHead(404, {'Content-Type': 'text/plain'});
		res.end('404 error!\n');
	});
}
